package phaseI;


import java.util.ArrayList;

public class TreeNode {
	private String data;
	public TreeNode left;
	public TreeNode right;
	
	public int numChildren;
	public ArrayList<TreeNode> children;

	public TreeNode(String data) {
		children = new ArrayList<TreeNode>();
		this.data = data;
		numChildren = 0;
	}

	public String getData() {
		return data;
	}

	public void setData(String data) {
		this.data = data;
	}
	
	public void addNode(TreeNode node) {
		children.add(node);
		numChildren++;
	}

	public TreeNode getLeft() {
		return left;
	}

	public void setLeft(TreeNode left) {
		this.left = left;
	}

	public TreeNode getRight() {
		return right;
	}

	public void setRight(TreeNode right) {
		this.right = right;
	}

	public String toString() {
		return "<"+data+"> ";
	}

}
